package com.daniel.gof.abstr;

/**
 * 详细说明
 *
 * @author Daniel
 * @version V1.0
 * @date 2020/5/14 11:40
 */
public class Client {

	public static void main(String[] args) {
		System.out.println("=================小米系列产品=================");
		IProductFactory factory = new XiaomiFactory();
		IPhoneProduct phone = factory.phoneProduct();
		phone.call();
		phone.send();

		IRouterProduct router = factory.routerProduct();
		router.open();
		router.setting();

		System.out.println("=================华为系列产品=================");
		factory = new HuaweiFactory();
		phone = factory.phoneProduct();
		phone.call();
		phone.send();

		router = factory.routerProduct();
		router.open();
		router.setting();
	}
}
